using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PerkRecoilReversal : Perk{
	
	void ShotEventHandler(object _sender,ShootEventArgs e){
		Weapon sender = _sender as Weapon;
		if(sender==null) return;
		if(sender.owner!=Player.instance) return;
		e.stat.recoil.AddMultiply(-1,float.MaxValue);
	}

	protected override void SubscribeEvents() {
		base.SubscribeEvents();
		Weapon.Shot+=ShotEventHandler;
	}
	protected override void UnSubscribeEvents() {
		base.UnSubscribeEvents();
		Weapon.Shot-=ShotEventHandler;
	}
}